package com.rem.mp.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.rem.mp.pojo.UserInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author Rem
 * @date 2022-03-31
 */

@DS("db2")
@Mapper
public interface UserInfoMapper2 extends BaseMapper<UserInfo> {


    /**
     * test
     *
     * @param name
     * @param sex
     * @return
     */
    @Insert("insert into user_info(name,sex) VALUES(#{name},#{sex})")
    int insertData2(@Param("name") String name, @Param("sex") String sex);


    @Insert("insert into user_info VALUES(#{userInfo.id},#{userInfo.name},#{userInfo.sex})")
    int insertforId2(@Param("userInfo") UserInfo userInfo);

}
